home *** CD-ROM | disk | FTP | other *** search
- Path: news.th-darmstadt.de!news!enno
- From: enno@inferenzsysteme.informatik.th-darmstadt.de (Enno Sandner)
- Newsgroups: comp.lang.tcl,comp.lang.c,comp.lang.c++,comp.databases.sybase,comp.databases.oracle,comp.databases.informix,comp.databases.oracle
- Subject: Re: realloc equivalent in C++
- Date: 10 Feb 1996 09:33:05 GMT
- Organization: Fachbereich Informatik, TH Darmstadt
- Distribution: world
- Message-ID: <ENNO.96Feb10103305@kitz.inferenzsysteme.informatik.th-darmstadt.de>
- References: <4fecgc$ar9@engr.orst.edu> <DMJ15v.13C@falcon.daytonoh.attgis.com>
- <4fgir1$pri@theory.tc.cornell.edu>
- NNTP-Posting-Host: kitz.intellektik.informatik.th-darmstadt.de
- In-reply-to: hzhou@r26n05.tc.cornell.edu's message of 9 Feb 1996 22:45:53 GMT
-
- In article <4fgir1$pri@theory.tc.cornell.edu> hzhou@r26n05.tc.cornell.edu (Honbo Zhou) writes:
-
- Is there anything in C++ equvalent to realloc in C which can be used
- to increase allocated memory? Can't find this even in C++ books which
- talk about memory management specifically. Thanks. Honbo
-
- Nothing prevents you from using 'realloc' in C++ to allocate _raw-memory_.
- However you shouldn't mix the 'malloc/free/realloc/...' with the 'new/
- new[]/delete/delete[]/...' families. The former are intended the maintain
- raw-memory while the latter manage the lifetime of objects. C++ has no
- direct support to reallocate an array of objects.
-
- Enno
- --
- Enno
-